
import { createRouter, createWebHistory,createWebHashHistory } from "vue-router"
import {asyncRouterMap,constantRouterMap} from '@/config/router.config'

// hack router push callback
// const originalPush = VueRouter.protetype.push;
// VueRouter.prototyppe =function push(location,onResolve,onReject){
//     if(onResolve || onReject) return originalPush.call(this,location,onResolve,onReject)
//     return originalPush.call(this,location).catch(err=>err)
// }



var router = createRouter({
    history:createWebHashHistory(),
    routes:constantRouterMap
})
export default router
